Skip to main content
Version: 1.0.2

Get Currency guide

The Get Currency guide API enables to fetch the required fields of chosen country and currency as per the VISA currency guide.

Method: POST

{{URL}}/jsonrpc

Headers

NameValue
Content-Typeapplication/json

Example

Payload Parameters
ParameterDescription

id

Mandatory

String

Unique ID of request

Example – "1"

method

Mandatory

String

Method Name

Example – "VisaService.GetCurrencyGuide "

params

Object

api

Object

credential

Mandatory

String

API credential provided by NetXD

Example – "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ="

signature

Mandatory

String

Signature of the digitally signed payload

Example – "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="

payload

Object

countryCode

Mandatory

String

Country code of the currency

Example – "TH"

instructedCurrency

Mandatory

String

Currency code representing the instructed currency

Example – "THB"

isForexRate

Mandatory

Boolean

Indicating that the exchange involves forex rates

Example – true

sourceCurrencyAlphaCode

Mandatory

String

The currency code for the source currency in the forex exchange

Example – "THB"

targetCurrencyAlphaCode

Mandatory

String

The currency code for the target currency in the forex exchange

Example – "USD"


curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","method":"VisaService.GetCurrencyGuide","params":{"api":{"credential":"Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5","signature":"MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="},"payload":{"countryCode":"TH","instructedCurrency":"THB","isForexRate":true,"sourceCurrencyAlphaCode":"THB","targetCurrencyAlphaCode":"USD"}}}'

Body


{
"id": "1",
"method": "VisaService.GetCurrencyGuide",
"params": {
"api": {
"credential": "Basic c3VwcG9ydCsxQG5ldHN5cy1pbmMuY29tOjM5ZDYxOGJkNTVmNzQ4ZGQ4ZWY4NWI5NWQxY2RlNDE5",
"signature": "MEQCICSDF4HIunb4xDLVEK9IOJYhT6j4wq5FwfJILSb4xbeSAiBdmpkV7uPB+39O6S+ea/61ar3dBmBNSU9ay229vin7sA=="
},
"payload": {
"countryCode": "TH",
"instructedCurrency": "THB",
"isForexRate": true,
"sourceCurrencyAlphaCode": "THB",
"targetCurrencyAlphaCode": "USD"
}
}
}

Response: 201

Response Parameters
ParameterDescription

jsonrpc

String

JSON RPC VERSION

Example – "2.0"

result

Object

effectiveConversionRate

Decimal

Effective conversion rate

Example – 0.029169

targetCurrency

String

target currency for the conversion

Example – "USD"

sourceCurrency

String

Represents the source currency for the conversion

Example – "THB"

rateExpiry

String

Indicates the expiry date and time of the conversion rate

Example – "2024-02-29T12:11:23.472Z"

rateId

String

A unique identifier for the conversion rate

Example – "62091147-76f1-4603-9e07-61acfa6c5a57"

currencyGuide

Object

countryName

String

Name of country

Example – "Thailand"

countryCode

String

Country code

Example – "TH"

countryCodeIso3

String

The ISO 3166-1 alpha-3 country code

Example – "THA"

currency

String

Currency code

Example – "THB"

currencyNumeric

String

The numeric code associated with the currency

Example – "764"

requiredFields

Object

accountNumber

String

Specifies whether an account number is required

Example – "true

bic

String

Specifies whether BIC is required

Example – true

paymentPurpose

String

Specifies whether a payment purpose is required

Example – true

pattern

Object

bic

Object

regex

Object

regex

String

Regular expression pattern for validating a BIC

Example – "^([A-Z]4)([A-Z]2)(([A-Z0-9]2))([0-9A-Z]3)?$"

message

String

A message indicating the reason for BIC validation failure

Example – "Creditor BIC invalid"

id

String

Unique ID of the request

Example – "1"


{
"jsonrpc": "2.0",
"result": {
"effectiveConversionRate": 0.029169,
"targetCurrency": "USD",
"sourceCurrency": "THB",
"rateExpiry": "2024-02-29T12:11:23.472Z",
"rateId": "62091147-76f1-4603-9e07-61acfa6c5a57",
"currencyGuide": {
"countryName": "Thailand",
"countryCode": "TH",
"countryCodeIso3": "THA",
"currency": "THB",
"currencyNumeric": "764",
"requiredFields": {
"accountNumber": true,
"bic": true,
"paymentPurpose": true
},
"pattern": {
"bic": {
"regex": {
"regex": "^([A-Z]{4})([A-Z]{2})(([A-Z0-9]{2}))([0-9A-Z]{3})?$",
"message": "Creditor BIC invalid."
}
}
}
}
},
"id": "1"
}